home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / tktdoc / overview.doc < prev    next >
Encoding:
Text File  |  1994-08-11  |  7.8 KB  |  227 lines

  1. TOOLKIT OVERVIEW
  2.  
  3. This section provides an overview of the development environment by
  4. discussing the directory tree, the development models available and
  5. the architecture of a DESQview/X X/Motif Client. Next, we will discuss
  6. the tools that you use to write, compile, link and debug your client.
  7. Porting issues are discussed as well as changes between UNIX and DESQview/X.
  8.  
  9. Once you have a general understanding of the pieces involved in generating
  10. an X Client, you can continue with the following chapters that tie
  11. everything together, provide a step-by-step example and discuss porting
  12. matters and DESQview/X differences from a UNIX X Window System.
  13.  
  14. The Directory Tree
  15.  
  16. Shown below to the right are the important parts of the DESQview/X
  17. directory tree that are of interest in creating an X Client.  This
  18. directory tree is similar to the X directory tree that you would find
  19. under /usr on a UNIX system.
  20.  
  21. DEMOS and CLIENTS
  22.  
  23. This directory contains subdirectories of the demonstration programs.  In
  24. each demonstration program subdirectory are the makefiles necessary
  25. to create the program for various compiler/linker combinations.
  26.  
  27. INCLUDE
  28.  
  29. This directory contains subdirectories of the X Window System, OSF/Motif
  30. and DESQview/X library header files that are required when compiling
  31. an X/Motif Client.
  32.  
  33. LIB
  34.  
  35. This directory contains subdirectories for the individual compilers
  36. you have installed, containing the appropriate X Window System and
  37. DESQview/X program libraries for that particular compiler. The MetaWare
  38. libraries are under HC386 and HC387, the Watcom libraries are under
  39. C386 and the GNU libraries are under DJGPP.
  40.  
  41. Development Models
  42.  
  43. In each demonstration program's subdirectory, for example\DVX\DEMOS\MAZE,
  44. you will find makefiles that will create a version of the program
  45. for each of the supported development models. The makefiles consist
  46. of a name with no file extension.
  47.  
  48. Only the development models that apply to the compiler edition of
  49. the toolkit which you have will apply to you.  All of the models are
  50. 32 bit.
  51.  
  52. By examining these makefiles you can determine all of the available
  53. compiler/linker combinations. These combinations should include:
  54.  
  55. For the DOS/4GX Extender:
  56.  
  57. This extender can be used with MetaWare and Watcom compilers and is
  58. included in the MetaWare and Watcom toolkit editions.
  59.  
  60. xxLE makefiles
  61.  
  62. Generates a 32-bit protected mode linear executable
  63. using the DOS/4GX extender.  The HCLE makefile uses the MetaWare High
  64. C/C++ compiler and the XGLU linker to generate a 32-bit Linear Executable
  65. using the DOS/4GX DOS extender.  The WCLE makefile uses the Watcom
  66. 9.5 C/C++ 32 compiler and the XGLU linker to generate a 32-bit Linear
  67. Executable using the DOS/4GX DOS extender.
  68.  
  69. Executables using XGLU can be debugged using the XD debugger.  Refer
  70. to the Rational Systems "DOS/4GX Building X Applications for DESQview/X"
  71. manual for details.
  72.  
  73. For the DOS/4GW Extender:
  74.  
  75. This extender can be used with, and is indcluded with, the Watcom
  76. compiler.  This extender comes with the Watcom compiler.
  77.  
  78. WC4G makefile
  79.  
  80. Generates a 32-bit protected mode linear executable
  81. using the DOS/4GW extender which is included with the Watcom compiler.  The
  82. WC4G makefile uses the Watcom 9.5 C/C++ 32 compiler and the wlink
  83. linker to generate a 32-bit Linear Executable using the DOS/4GW DOS
  84. extender.
  85.  
  86. Executables using the wlink linker can be debugged using the WVIDEO
  87. debugger that comes with your Watcom compiler.  Refer to the Watcom
  88. WVIDEO manual for details.
  89.  
  90. For the Phar Lap 386 or TNT DOS Extender:
  91.  
  92. xxPHAR
  93.  
  94. Generates a 32-bit protected mode program using the
  95. Phar Lap DOS extender.  HCPHAR uses the MetaWare High C/C++ compiler
  96. and Phar Lap's 386link to generate a 32-bit executable.
  97.  
  98. For the GO32 DOS Extender:
  99.  
  100. MAKEFILE
  101.  
  102. Generates a 32-bit protected mode program using the
  103. GO32 DOS extender.  makefile uses the DJGPP GNU C/C++ compiler and
  104. the ld linker to generate a 32-bit executable.
  105.  
  106. Executables using this model can be debugged using the go32 debugger
  107. debug32.  Refer to the *.doc files in the DJGPP distribution.
  108.  
  109. From the choices of makefiles, you should be able to decide which
  110. compiler/linker combination best fits your needs.
  111.  
  112. During toolkit installation a batch file is generated to set up an
  113. environment for each compiler with the default model.  The batch files
  114. are placed in the DVX directory as follows:
  115.  
  116. HIGHC.BAT     -     High C/C++ with the XGLU linker (HCLE).
  117. WATCOM.BAT     -     Watcom 9.5 C/C++ 32 with the wlink linker (WC4G).
  118. DJGPP.BAT     -     DJGPP GNU C/C++ with the gcc linker (makefile)
  119.  
  120. If you wish to use the non-default model, minor changes to the batch
  121. files can be made to accommodate.
  122.  
  123. QMAKE a make utility
  124.  
  125. Quarterdeck's QMAKE.EXE is a utility much like the standard UNIX MAKE
  126. and is found in the DESQview/X directory, usually \DVX.
  127.  
  128. QMAKE supports macros, include files, multiple targets and the standard
  129. set of command line options. To display a concise listing of available
  130. switches you can issue the command QMAKE -h in the DESQview/X
  131. directory.
  132.  
  133. For a complete description of the format of QMAKE makefiles, see any
  134. documentation describing the UNIX MAKE utility--QMAKE makefiles
  135. are virtually identical.
  136.  
  137. You may of course make your own makefiles and use another make utility
  138. if you wish.
  139.  
  140. Architecture of a DESQview/X X/Motif Client
  141.  
  142. A DESQview/X X/Motif Client can consist of many programming layers
  143. which rely on lower layers, and when all are used, the X Client might
  144. be conceptually partitioned as follows:
  145.  
  146. Xm
  147.  
  148. Xm is the OSF/Motif widget set and is layered on
  149. top of the Xt programming library.  Xm provides the X Clients with
  150. high level objects such as buttons, scrollbars and dialog boxes.
  151.  
  152.  
  153. Mrm
  154.  
  155. Mrm is the OSF/Motif programming library that provides
  156. resource management for the OSF/Motif widget set.
  157.  
  158. Xaw
  159.  
  160. Xaw is the Athena widget set and requires both libraries
  161. Xmu and Xt to operate. Xaw provides the X Client with high level objects
  162. such as buttons, scrollbars and dialog boxes. You would not use both
  163. the Athena and Motif widget sets within the same client.
  164.  
  165. Xt
  166.  
  167. The Xt layer supports an object-oriented framework
  168. that may be used by either an X Client or by a higher level library
  169. such as Xaw or Xm.
  170.  
  171. Xmu
  172.  
  173. Xmu is a library of miscellaneous utility routines
  174. that may be used by an X Client and is also used by library Xaw.
  175.  
  176. Xext
  177.  
  178. Xext incorporates extensions to the X Window System,
  179. such as shaped windows. These are extensions to Xlib.
  180.  
  181. Xlib
  182.  
  183. This layer translates C calls into the low level
  184. X Protocol messages. An X Client that uses only Xlib calls and dispenses
  185. with any of the higher level libraries is called an Xlib Client.
  186.  
  187. Sys - System Library
  188.  
  189. This contains the Berkeley Socket Interface routines
  190. through which the X Client performs its work. These routines may be
  191. called directly by the X Client or by the X11 programming layers.
  192.  
  193. In addition to these programming layers, the X Client may implement
  194. the following:
  195.  
  196. Interprocess communications
  197.  
  198. An X Client can communicate with other X Clients
  199. (whether on the same machine or a different machine) by using the
  200. network-independent Berkeley Socket Interface contained in the DESQview/X
  201. System Library.
  202.  
  203.  
  204. Scalable Fonts
  205.  
  206. An X Client may use the Adobe Type Manager Type I
  207. scalable font technology to create true WYSIWYG displays. This is
  208. performed using standard Xlib calls.
  209.  
  210. Printing
  211.  
  212. An X Client may create printer output in much the
  213. same way as using X programming calls to create display output. This
  214. is performed using standard Xlib calls.
  215.  
  216. DESQview/X Help
  217.  
  218. Using the DESQview/X Help System you may create help
  219. files for your own applications.
  220.  
  221. Window Manager Features
  222.  
  223. An X Client may draw upon the features of a particular
  224. window manager. This is accomplished through the use of X properties
  225. that are manipulated using standard Xlib calls.
  226.  
  227.